The present invention relates to a method of coding a continuous-tone image including a halftoning conversion at data output means such as printers, copiers, facsimiles and the like, and data compression. The present invention also relates to an image coding apparatus and a recording medium containing an image coding program.
Printers, copiers, facsimiles and the like have developed their functions into the higher resolution, higher picture quality and outputting color data. Those technical trends require data-compression techniques for achieving considerable economies in the resources used to store and transmit image data. Image-data-compression, in particular, is a key technique to avoid distortion of picture quality.
Lossless data compression technique is well known for compressing image data, this technique includes arithmetic coding, Huffman transform, modified Huffman (MH) coding, modified READ (MR) coding and other methods combining predictive coding with one of those coding methods.
However, those coding methods have not achieved a substantial compression rate over pseudo-half-tone bi-level image: data that is made from a natural image undergoing the halftoning conversion.
To overcome this problem, a prior art takes the following measures: an image data is binary coded, and before the image data is compressed the binary coded data is converted to a data sequence for the lossless compression method to compress at a high compression rate. As a result, a compression rate increases.
A conventional method concerning the technique compressing pseudo-half-tone bi-level image data is described hereinafter with reference to FIG. 28 through FIG. 30. This bi-level image data is halftoning-converted from a continuous-tone image.
FIG. 28 is a block diagram illustrating conventional methods of halftoning conversion and compression of a continuous-tone image.
In FIG. 28, when a continuous-tone image data is input, halftoning converter 1 converts the image into a pseudo-half-tone bi-level image, thereby producing a binary image data. Data converter 2 converts the binary image data to a binary data sequence allowing data conversion at a high compression rate.
Predictive coding apparatus 3 provides this binary data sequence with predictive coding referring to the surrounding pixels already coded, and the data sequence is transformed to a data sequence where xe2x80x9c1xe2x80x9d is put only to the pixels having different values from the predicted values, i.e. the pixels inaccurately predicted. Entropy-coding apparatus 4 applies Huffman coding or arithmetic coding to the data sequence supplied from predictive coding apparatus 3, thereby producing compressed binary data.
FIG. 29 illustrates an example of data converted by data converter 2. FIG. 29(a) shows the data before conversion, and FIG. 29(b) shows binary image data after the conversion. Data converter 2 converts the data so that a number of pixel patterns frequently appearing can increase, whereby a data sequence allowing data conversion at a high compression rate can be produced.
FIG. 30 illustrates predictive coding of a binary image data. In FIG. 30(a), coding is predicted by referring to four pixels X1, X2, X3 and X4, and there are 16 statuses of the four pixels, i.e. 24=16. Considering those 16 statuses, predictive coding apparatus 3 prepares predictive functions f(X) in the following manner:
f(X1, X2, X3, X4)=1 for the patterns of pixels that has a strong probability of rendering a present pixel X to take xe2x80x9c1xe2x80x9d.
f(X1, X2, X3, X4)=0 for the patterns of pixels that has a strong probability of rendering a present pixel X to take xe2x80x9c0xe2x80x9d.
Predictive coding apparatus 3 predicts the coding with this predictive function f(X), and as shown in FIG. 30(b), performs the predictive coding by allowing the pixel inaccurately predicted to output xe2x80x9c1xe2x80x9d and the pixel accurately predicted to output xe2x80x9c0xe2x80x9d.
However, the conventional method discussed above encounters data deviating from a rule of binary coding when data converter 2 converts a binary data to a data sequence allowing data compression at a high compression rate. This results in lowering substantially picture quality.
The present invention addresses the problem discussed above and aims to provide a method of coding a continuous-tone image, an image coding apparatus for a continuous-tone image, and a recording medium containing an image coding program. These method, coding apparatus and medium realize a compression of binary image data at a high compression rate and with a quality picture.